<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 父元素disply:flex */
        section {
            display: flex;
            width: 100%;
            height: 100px;
            max-width: 1500px;
            min-width: 280px;
            background-color: red;
            /* 盒子排列方向  */
            flex-direction: column;

        }

        section div {
            height: 100%;
        }
        /* 子元素flex */
        div:first-child {
            background-color: pink;
            flex: 1;
        }

        /* 也可以是固定宽度 */
        div:nth-child(2) {
            background-color: yellow;
            flex: 2;
        }

        div:last-child {
            background-color: green;
            flex: 1;
        }
    </style>
</head>

<body>
    <section>
        <div></div>
        <div></div>
        <div></div>
    </section>
</body>

</html>